#include "adjacencyList.h"

void setupGraph(AGraph *graph) {
    char *nodesName[] = {"A", "B", "C", "D", "E"};
    initAGraph(graph, 5, nodesName, 1);
    addAGraphEdge(graph, 0, 1, 1);
    addAGraphEdge(graph, 0, 4, 1);
    addAGraphEdge(graph, 0, 3, 1);
    addAGraphEdge(graph, 1, 2, 1);
    addAGraphEdge(graph, 1, 4, 1);
    addAGraphEdge(graph, 2, 0, 1);
    addAGraphEdge(graph, 3, 2, 1);
}

int main() {
    int n = 5;
    AGraph *graph = createAGraph(n);
    setupGraph(graph);
    printf("edges : %d\n", graph->edgeNum);
    printf("BFS: ");
    BFSAGraphTravel(graph, 0);
    printf("\n");
    resetAGraphVisited(graph);
    printf("DFS: ");
    DFSAGraphTravel(graph, 0);
    printf("\n");
    releaseAGraph(graph);
    return 0;
}


